﻿using Boardgame;
using BoardgameModelViewed;
using BoardgameModel;
using System;
using System.Collections.Generic;


namespace ChessBench
{
    class Rook01
    {
        // Exercise castling.
        static void Main ()
        {
            ChessModel game = new ChessModel (4, 0, 4, 7);
            game.Put (new Rook (Player.White), 0, 0);
            game.Put (new Rook (Player.Black), 7, 7);

            Console.WriteLine (game.Board);

            Console.WriteLine ("\nTurn={0}, Status={1}", game.PlayerTurn, game.Status);
            game.MakeMove (4, 0, 2, 0);
            Console.WriteLine (game.Plies.Top.ToString () + "\n");

            Console.WriteLine (game.Board);

            Console.WriteLine ("\nTurn={0}, Status={1}", game.PlayerTurn, game.Status);
            game.MakeMove (4, 7, 6, 7);
            Console.WriteLine (game.Plies.Top.ToString () + "\n");
            Console.WriteLine (game.Board);

            Console.WriteLine ("\nTurn={0}, Status={1}", game.PlayerTurn, game.Status);
            game.MakeMove (3, 0, 6, 0);
            Console.WriteLine (game.Plies.Top.ToString () + "\n");
            Console.WriteLine (game.Board);

            Console.WriteLine ("\nTurn={0}, Status={1}", game.PlayerTurn, game.Status);
        }
    }
}
